<template>
	<view class="select-business">
		<view class="work-day">选择业务</view>
		<view class="work-list">
			<view v-for="item in serviceHallArr" :key="item.id">
				<view class="list"  @click="handleReservation(item)">{{item.name}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { handleGetBusiness } from '../utils/methods.js'
	export default {
		data() {
			return {
				serviceHallArr: []
			}
		},
		methods: {
			handleReservation(item) {
				uni.navigateTo({url: `/pages/select_reservation?business=${JSON.stringify(item)}`})
			}
		},
		mounted() {
			handleGetBusiness().then(res => {
				if(res.data.code === 0) {
					this.serviceHallArr = res.data.data
				}
			})
		}
	}
</script>

<style lang="less">
.select-business {
	padding: 10px 10rpx;
	box-sizing: border-box;
	.work-day {
		border-left: 10rpx solid #0c45bd;
		color: #0c45bd;
		padding: 20rpx;
		font-size: 40rpx;
		font-weight: 600;
		margin-bottom: 20rpx;
	}
	.work-list {
		padding: 0px 30rpx;
		.list {
			border: 2px solid #f3f3f3;
			padding: 30rpx;
			border-radius: 10rpx;
			text-align: center;
			font-size: 40rpx;
			margin-bottom: 20rpx;
		}
	}
}
</style>
